{% extends 'JordiLlonchCrudGeneratorBundle::layout.html.twig' %}

{% block title %}
{{ parent() }} - Partido {{ 'views.index.list'|trans({}, 'JordiLlonchCrudGeneratorBundle') }}
{% endblock %}

{% block page %}

<div class="row">

    <div class="span8">
        <h1>Partido {{ 'views.index.list'|trans({}, 'JordiLlonchCrudGeneratorBundle') }}</h1>
    </div>
    <div class="span2">
        {% if form_errors(filterForm) %}
        <div class="alert alert-block alert-error fade in form-errors">
            {{ form_errors(filterForm) }}
        </div>
        {% endif %}
        &nbsp;
    </div>
    <div class="span2">
        <div class="filters-right">
            <a class="btn dropdown-toggle" data-toggle="collapse" data-target="#filters">
                {{ 'views.index.filters'|trans({}, 'JordiLlonchCrudGeneratorBundle') }}
                <span class="caret"></span>
            </a>
        </div>
    </div>

    <div class="span12">
        <div id="filters" class="collapse">

            <form class="well" action="{{ path('partido') }}" method="post" {{ form_enctype(filterForm) }}>
                {{ form_row(filterForm.id) }}
                {{ form_row(filterForm.fecha) }}
                {{ form_row(filterForm.horario) }}
                {{ form_rest(filterForm) }}

                <p>
                    <button type="submit" name="filter_action" value="reset">{{ 'views.index.reset'|trans({}, 'JordiLlonchCrudGeneratorBundle') }}</button>
                    <button type="submit" name="filter_action" value="filter">{{ 'views.index.filter'|trans({}, 'JordiLlonchCrudGeneratorBundle') }}</button>
                </p>
            </form>
        </div>
    </div>

    <div class="span12">

    <table class="table table-striped table-bordered table-condensed">
    <thead>
        <tr>
            <th>Id</th>
            <th>Fecha</th>
            <th>Horario</th>
            <th>{{ 'views.index.actions'|trans({}, 'JordiLlonchCrudGeneratorBundle') }}</th>
        </tr>
    </thead>
    <tbody>
    {% for entity in entities %}
        <tr>
            <td><a href="{{ path('partido_show', { 'id': entity.id }) }}">{{ entity.id }}</a></td>
            <td>{% if entity.fecha %}{{ entity.fecha|date('Y-m-d') }}{% endif %}</td>
            <td>{{ entity.horario|date('H:i:s') }}</td>
            <td>
        <a class="btn btn-mini" href="{{ path('partido_show', { 'id': entity.id }) }}">
            {{ 'views.actions.show'|trans({}, 'JordiLlonchCrudGeneratorBundle') }}
        </a>
        <a class="btn btn-mini" href="{{ path('partido_edit', { 'id': entity.id }) }}">
            {{ 'views.actions.edit'|trans({}, 'JordiLlonchCrudGeneratorBundle') }}
        </a>            </td>
        </tr>
    {% endfor %}
    </tbody>
</table>
    </div>

    <div class="span4">
    {{ pagerHtml|raw }}
    </div>

        <div class="span8">
    <a class="btn likepaginator" href="{{ path('partido_new') }}">
            {{ 'views.index.createnew'|trans({}, 'JordiLlonchCrudGeneratorBundle') }} Partido
        </a>
    </div>
</div>

{% endblock %}